@use "../global/variables";

.header {
  background-color: variables.$base-white;
}

.header__container {
  position: relative;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin: 0 -20px;
}

.header__page {
  margin-right: auto;
}

.header__page-logo {
  display: flex;
  padding: 12px 20px;
}

.header__logo-image {
  display: block;
}

.header__logo-description {
  display: none;
}

.header__main-navigation {
  position: absolute;
  top: 100%;
  z-index: 2;
  display: none;

  &--nojs {
    position: static;
    display: initial;
    order: 1;
  }
}

.header__menu-button {
  &--nojs {
    display: none;
  }
}

@media (min-width: variables.$min-tablet-width) {
  .header__container {
    margin: 0;
  }

  .header__page {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }

  .header__page-logo {
    padding: 12px 0;
  }

  .header__logo-image {
    width: 82px;
    height: 36px;
  }

  .header__main-navigation {
    position: static;
    display: block;

    &--nojs {
      order: 0;
    }
  }

  .header__private-navigation {
    margin-left: 60px;
  }

  .header__navigation-links {
    display: flex;
    justify-content: space-between;
  }

  .header__navigation-link-item {
    padding: 30px 20px;
    white-space: nowrap;

    &--current {
      position: relative;

      .header__navigation-link {
        color: variables.$blue-primary;
      }

      &::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        display: block;
        width: 100%;
        height: 2px;
        background-color: variables.$blue-primary;
      }
    }
  }

  .header__menu-button {
    display: none;
  }
}

@media (min-width: variables.$min-desktop-width) {
  .header__container {
    justify-content: space-between;
  }

  .header__page {
    margin-right: 0;
  }

  .header__page-logo {
    padding-right: 20px;
  }

  .header__logo-image {
    width: 170px;
    height: 36px;
  }

  .header__logo-description {
    display: block;
  }

  .header__navigation-links {
    display: flex;
    justify-content: space-between;
  }

  .header__private-navigation {
    margin-left: 0;
  }

  .header__navigation-link {
    display: block;
  }

  .header__navigation-link-item {
    margin-right: 20px;
  }
}
